<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<h1>我是真的网站</h1>
<form action="" method="post">
{# from 表单内csrf #}
{#    {% csrf_token %}#}
    <p>username:
        <input type="text" name="username">
    </p>
    <p>target_user:
        <input type="text" name="target_user">
    </p>
    <p>money:
        <input type="text" name="money">
    </p>
    <input type="submit">
</form>
{# from ajax内csrf #}
{#<button id="d1">发送ajax请求</button>#}
{#<script src="/static/mycsrf.js"></script>#}
{#<script>#}
{#    $('#d1').click(function (){#}
{#        $.ajax({#}
{#            url:'',#}
{#            type:'post',#}
{#            data:{},#}
            {#data:{'csrfmiddlewaretoken':'{{ csrf_token }}'},#}
{#            success:function (args){#}
{##}
{#            }#}
{#        })#}
{#    })#}
{#</script>#}
</body>
</html>